<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Array Diff</title>
    <script src="lib/rollup.browser.js"></script>
    <script src="lib/requireES.js"></script>
    <script src="lib/config.js"></script>
</head>
<body>
    <script type="text/javascript">

    requireES(["quark-renderer/src/core/utils/arrayDiff2"], function(arrayDiff) {
        // console.log(arrayDiff('abcde', 'bcdkeabc'));
        var arr0 = [{"name":"类目12"},{"name":"类目13"},{"name":"类目14"},{"name":"类目15"},{"name":"类目16"},{"name":"类目17"}];
        var arr1 = [{"name":"类目11"},{"name":"类目12"},{"name":"类目13"},{"name":"类目14"},{"name":"类目15"},{"name":"类目16"}];
        console.log(arrayDiff(arr0, arr1, function (a, b) {
            return a.name === b.name;
        }));
        // var data1 = [];
        // var data2 = [];
        // for (var i = 0; i < 10000; i++) {
        //     data1.push(i + '');
        // }
        // var data2 = data1.slice();
        // data2.shift();
        // data2.push(i);
        // console.log(data1, data2);
        // console.profile('diff');
        // console.log(arrayDiff(data1, data2));
        // console.profileEnd('diff');
    });
    </script>
    <div id="Main" style="width:600px;height:400px;"></div>
</body>
</html>